package com.basketball.service.impl;

import com.basketball.entity.Player;
import com.basketball.repository.PlayerRepository;
import com.basketball.service.PlayerService;
import com.basketball.task.BasketBallTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public  class PlayerServiceImpl implements PlayerService {
    @Autowired
    private PlayerRepository playerRepository;
    @Override
    public List<Player> getByState() {
        return playerRepository.getByState("Y");
    }

    @Override
    public Player getBySec(String sec) {
        return playerRepository.getBySec(sec);
    }

    @Override
    public void save(Player player) {
        playerRepository.save(player);
    }
}
